﻿using Loogn.DataAccess;
using Loogn.DBTest.DAL;
using Loogn.DBTest.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Loogn.DBTest.BLL
{
    public class UserBLL
    {
        DAL.UserDAL dal = new DAL.UserDAL();

        public UserInfo FindOne(int id)
        {
            return dal.FindOne("ID=" + id);
        }

        public List<UserInfo> FindALL()
        {
            return dal.FindAll();
        }

        public PageResult<UserInfo> FindPage(string name, byte age, int pageindex, int pageSize, bool isTotal)
        {
            return dal.FindPage("Name=@n and Age>@age", null, "ID desc", pageindex, pageSize, isTotal);
        }
    }
}
